package rxjava.application.com.androidmyp.Data;

import com.google.gson.JsonObject;

import java.util.HashMap;
import java.util.List;

import retrofit.Call;
import retrofit.http.FieldMap;
import retrofit.http.FormUrlEncoded;
import retrofit.http.POST;
import retrofit.http.Query;
import rx.Observable;
import rxjava.application.com.androidmyp.Beans.BaseBean;
import rxjava.application.com.androidmyp.Beans.SchoolClass;
import rxjava.application.com.androidmyp.Beans.User;

/**
 * Created by Qiujc on 2016/4/14.
 * 定义网络的接口
 */
public interface ApiCenter {
    @POST("/user_login")
    Observable<BaseBean<User>> UserLogin(@Query("username")String username, @Query("password") String password);

    @POST("/user_login")
    Call<JsonObject> UserLoginWithRetrofit(@Query("username")String username,@Query("password") String password);

    @FormUrlEncoded
    @POST("/instalment1.4/api/test/getClassData")
    Observable<BaseBean<List<SchoolClass>>> getClass(@FieldMap HashMap<String,String> hashMap);
}
